/*
 * @ : Copyright (c) 2021 Phytium Information Technology, Inc. 
 *  
 * SPDX-License-Identifier: Apache-2.0.
 * 
 * @Date: 2021-07-20 08:14:11
 * @LastEditTime: 2021-07-26 13:29:52
 * @Description:  This files is for 
 * 
 * @Modify History: 
 *  Ver   Who        Date         Changes
 * ----- ------     --------    --------------------------------------
 */
#include "parameters.h"
#include "ft_assert.h"
#include "qspi.h"

extern QSpiConfig QSpiConfigTbl[QSPI_NUM];
const QSpiConfig *NorFlashLookupConfig(u32 instanceId)
{
    QSpiConfig *pConfig = NULL;
    u32 index;

    for (index = 0; index < (u32)FT_UART_NUM; index++)
    {
        if (QSpiConfigTbl[index].instanceId == instanceId)
        {
            pConfig = &QSpiConfigTbl[index];
            break;
        }
    }

    return (QSpiConfig *)pConfig;    
}